Optimal. Leaf size=59 \[ \frac {\left (a^2+b^2\right ) \log (a+b \tan (c+d x))}{b^3 d}-\frac {a \tan (c+d x)}{b^2 d}+\frac {\tan ^2(c+d x)}{2 b d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.05, antiderivative size = 59, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 2, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.095, Rules used = {3587, 711}
\begin {gather*} \frac {\left (a^2+b^2\right ) \log (a+b \tan (c+d x))}{b^3 d}-\frac {a \tan (c+d x)}{b^2 d}+\frac {\tan ^2(c+d x)}{2 b d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 711
Rule 3587
Rubi steps
\begin {align*} \int \frac {\sec ^4(c+d x)}{a+b \tan (c+d x)} \, dx &=\frac {\text {Subst}\left (\int \frac {1+\frac {x^2}{b^2}}{a+x} \, dx,x,b \tan (c+d x)\right )}{b d}\\ &=\frac {\text {Subst}\left (\int \left (-\frac {a}{b^2}+\frac {x}{b^2}+\frac {a^2+b^2}{b^2 (a+x)}\right ) \, dx,x,b \tan (c+d x)\right )}{b d}\\ &=\frac {\left (a^2+b^2\right ) \log (a+b \tan (c+d x))}{b^3 d}-\frac {a \tan (c+d x)}{b^2 d}+\frac {\tan ^2(c+d x)}{2 b d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.32, size = 71, normalized size = 1.20 \begin {gather*} \frac {b^2 \sec ^2(c+d x)-2 \left (\left (a^2+b^2\right ) (\log (\cos (c+d x))-\log (a \cos (c+d x)+b \sin (c+d x)))+a b \tan (c+d x)\right )}{2 b^3 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.37, size = 53, normalized size = 0.90
method | result | size |
derivativedivides | \(\frac {-\frac {-\frac {b \left (\tan ^{2}\left (d x +c \right )\right )}{2}+a \tan \left (d x +c \right )}{b^{2}}+\frac {\left (a^{2}+b^{2}\right ) \ln \left (a +b \tan \left (d x +c \right )\right )}{b^{3}}}{d}\) | \(53\) |
default | \(\frac {-\frac {-\frac {b \left (\tan ^{2}\left (d x +c \right )\right )}{2}+a \tan \left (d x +c \right )}{b^{2}}+\frac {\left (a^{2}+b^{2}\right ) \ln \left (a +b \tan \left (d x +c \right )\right )}{b^{3}}}{d}\) | \(53\) |
risch | \(\frac {-2 i a \,{\mathrm e}^{2 i \left (d x +c \right )}+2 b \,{\mathrm e}^{2 i \left (d x +c \right )}-2 i a}{b^{2} d \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{2}}-\frac {\ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right ) a^{2}}{b^{3} d}-\frac {\ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )}{b d}+\frac {\ln \left ({\mathrm e}^{2 i \left (d x +c \right )}-\frac {i b +a}{i b -a}\right ) a^{2}}{b^{3} d}+\frac {\ln \left ({\mathrm e}^{2 i \left (d x +c \right )}-\frac {i b +a}{i b -a}\right )}{b d}\) | \(170\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.28, size = 53, normalized size = 0.90 \begin {gather*} \frac {\frac {b \tan \left (d x + c\right )^{2} - 2 \, a \tan \left (d x + c\right )}{b^{2}} + \frac {2 \, {\left (a^{2} + b^{2}\right )} \log \left (b \tan \left (d x + c\right ) + a\right )}{b^{3}}}{2 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 117 vs.
\(2 (57) = 114\).
time = 0.39, size = 117, normalized size = 1.98 \begin {gather*} \frac {{\left (a^{2} + b^{2}\right )} \cos \left (d x + c\right )^{2} \log \left (2 \, a b \cos \left (d x + c\right ) \sin \left (d x + c\right ) + {\left (a^{2} - b^{2}\right )} \cos \left (d x + c\right )^{2} + b^{2}\right ) - {\left (a^{2} + b^{2}\right )} \cos \left (d x + c\right )^{2} \log \left (\cos \left (d x + c\right )^{2}\right ) - 2 \, a b \cos \left (d x + c\right ) \sin \left (d x + c\right ) + b^{2}}{2 \, b^{3} d \cos \left (d x + c\right )^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\sec ^{4}{\left (c + d x \right )}}{a + b \tan {\left (c + d x \right )}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.49, size = 54, normalized size = 0.92 \begin {gather*} \frac {\frac {b \tan \left (d x + c\right )^{2} - 2 \, a \tan \left (d x + c\right )}{b^{2}} + \frac {2 \, {\left (a^{2} + b^{2}\right )} \log \left ({\left | b \tan \left (d x + c\right ) + a \right |}\right )}{b^{3}}}{2 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 3.59, size = 57, normalized size = 0.97 \begin {gather*} \frac {{\mathrm {tan}\left (c+d\,x\right )}^2}{2\,b\,d}+\frac {\ln \left (a+b\,\mathrm {tan}\left (c+d\,x\right )\right )\,\left (a^2+b^2\right )}{b^3\,d}-\frac {a\,\mathrm {tan}\left (c+d\,x\right )}{b^2\,d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________